#include "stdafx.h"
#include "DivExample.h"

void DivExample::loadFile(const String& fileName, FCView *view){
    FCUIXml::loadFile(fileName, view);
    //获取第二页
   FCTabPage *tabPage = getTabPage(L"TabPage2");
   FCDiv *div = new FCDiv();
    FCPoint point = {50,50};
   div->setLocation(point);
    FCSize size = {200,200};
   div->setSize(size);
   div->setShowHScrollBar(true);
   div->setShowVScrollBar(true);
   tabPage->addView(div);
   for (int i = 0; i < 10; i++)
   {
       FCButton *button = new FCButton();
       FCPoint point2 = {i * 40, i * 40};
       button->setLocation(point2);
       FCSize size2 = {100, 20};
       button->setSize(size2);
       div->addView(button);
       button->setText(L"确定");
   }
}
